package cn.b.sky.mes.qm.dao;

import java.util.List;

import cn.b.sky.mes.qm.model.DefectNode;
import cn.b.sky.mes.qm.model.condition.DefectNodeCondition;
import org.apache.ibatis.annotations.Param;

public interface DefectNodeDao {
  List<DefectNode> selectAllDefectNodeBySiteCode(String siteCode);

  List<DefectNode> selectDefectNodeByCondition(DefectNodeCondition condition);

  int selectDefectNodeCountByCondition(DefectNodeCondition condition);

  DefectNode selectDefectNodeByPk(@Param("siteCode") String siteCode, @Param("nodeCode") String nodeCode);

  void insertDefectNode(DefectNode defectNode);

  void updateDefectNode(DefectNode defectNode);

  void deleteDefectNodeByPk(@Param("siteCode") String siteCode, @Param("nodeCode") String nodeCode);

  List<DefectNode> selectChildrensNode(@Param("siteCode") String siteCode,
      @Param("parentNodeCode") String parentNodeCode);
}
